//@author A0106044W
package commandInfo;

import java.util.logging.Level;

import logic.Logic;
import storage.Task;

/**
 * 
 * 
 * 	       Sothearith Sreang
 *         All of the CommandInfo part is written by me.
 *         commandInfo is created for command history purposes.
 * 			
 */

public class EditCommandInfo extends CommandInfo {
	Task newTask;
	Task oldTask;
	
	private static final String COMMAND = "EDIT";
	
	public EditCommandInfo(Task newTaskAtt, Task oldTaskAtt) {
		super.command = COMMAND;
		try{
			newTask = newTaskAtt.cloneSelf();
			oldTask = oldTaskAtt.cloneSelf();
		} catch (Exception e) {
			Logic.logger.log(Level.SEVERE, e.getMessage());
		}
	}
	
	public Task getPreviousTask() {
		return oldTask;
	}
	
	public Task getUpdatedTask() {
		return newTask;
	}
}
